(window.MIP = window.MIP || []).push({
    name: "mip-nav-slidedown", func: function () {
        define("mip-nav-slidedown/mip-nav-slidedown", ["require", "customElement", "zepto"], function (e) {
            function t() {
                var e = this.element;
                i(e), n(e), a(e);
            }

            function i(e) {
                //var t = l(e), i = t.data("id"), n = !(0 === t.data("showbrand")), o = t.data("brandname") || "", r = t.data("brandhref") || "#", a = t.find("#" + i), s = l("<div></div>"), c = '<div class="navbar-header"><button class="navbar-toggle collapsed" type="button" data-target="#' + i + '" aria-controls="' + i + '" aria-expanded="false"><span class="sr-only">导航</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button>' + (n ? "<a href=" + r + ' class="navbar-brand">' + o + "</a>" : "") + "</div>";
                //s.append(c).append(a).appendTo(t), l(".mip-nav-wrapper").addClass("show");
            }

            function n(e) {
                var t = l("body").attr("class");
                l("#bs-navbar").find("." + t).addClass("active"), l(document).on("click", ".navbar-header .navbar-toggle", o), r(l("#navbar-wise-close-btn")), l("#navbar-wise-close-btn").on("touchend", function (e) {
                    l(".navbar-header .navbar-toggle").trigger("click"), e.preventDefault(), e.stopPropagation();
                }).on("click", function () {
                    l(".navbar-header .navbar-toggle").trigger("click");
                });
            }

            function o(e) {
                function t(e) {
                    if ("open" === e) i.addClass("in");
                    if ("resize" === e && i.hasClass("in") || "open" === e) {
                        var t = l("#bs-navbar li").length, o = l("mip-nav-slidedown")[0] ? l("mip-nav-slidedown")[0].getBoundingClientRect().top : 0, r = window.innerHeight - l(".navbar-header").height() - o;
                        if (i.height(r), (n = r - l(".navbar-right li").height() * t - 90) > 20) l(".navbar-wise-close").css("margin-top", n + "px"); else l(".navbar-wise-close").css("margin-top", "20px");
                    }
                }

                if (!(window.innerWidth > 767)) {
                    var i = l("#bs-navbar");
                    if (i.hasClass("in")) i.height("0px"), l("body").css("overflow", "scroll"), l(".navbar-wise-close").css("margin-top", "20px"), l(window).off("orientationchange"), l("html").add(l("body")).removeClass("noscroll"), setTimeout(function () {
                        i.removeClass("in");
                    }, 500); else {
                        var n = 20;
                        i = l("#bs-navbar"), l("html").add(l("body")).addClass("noscroll"), t("open"), l(window).on("orientationchange", function () {
                            window.setTimeout(function () {
                                t("resize");
                            }, 100);
                        }).on("resize", function () {
                            t("resize");
                        });
                    }
                }
            }

            function r(e) {
                e.on("touchstart", function () {
                    l(this).addClass("down");
                }).on("mousedown", function () {
                    l(this).addClass("down");
                }).on("touchend", function () {
                    l(this).removeClass("down");
                }).on("mouseup", function () {
                    l(this).removeClass("down");
                });
            }

            function a(e) {
                l(e).removeAttr("style");
            }

            var s = e("customElement").create(), l = e("zepto");
            return s.prototype.build = t, s;
        }), define("mip-nav-slidedown", ["mip-nav-slidedown/mip-nav-slidedown"], function (e) {
            return e;
        }), function () {
            function e(e, t) {
                e.registerMipElement("mip-nav-slidedown", t, ".mip-nav-wrapper{height:72px}.mip-nav-wrapper.show{opacity:1 !important}.mip-nav-wrapper .hr-xs{display:none}mip-nav-slidedown #bs-navbar{margin-bottom:0;margin-right:0;float:right}mip-nav-slidedown #bs-navbar .navbar-nav{display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;margin-top:10px;margin-right:-25px}mip-nav-slidedown #bs-navbar .navbar-nav li{list-style:none;line-height:50px}mip-nav-slidedown #bs-navbar .navbar-nav li.active a,mip-nav-slidedown #bs-navbar .navbar-nav li.active mip-link mip-nav-slidedown #bs-navbar .navbar-nav li.active span{color:black;font-weight:bold}mip-nav-slidedown #bs-navbar .navbar-nav mip-link,mip-nav-slidedown #bs-navbar .navbar-nav a,mip-nav-slidedown #bs-navbar .navbar-nav span{white-space:nowrap;margin:15px;padding:10px;color:#666}mip-nav-slidedown #bs-navbar .navbar-nav mip-link:hover,mip-nav-slidedown #bs-navbar .navbar-nav a:hover,mip-nav-slidedown #bs-navbar .navbar-nav span:hover,mip-nav-slidedown #bs-navbar .navbar-nav mip-link:focus,mip-nav-slidedown #bs-navbar .navbar-nav a:focus,mip-nav-slidedown #bs-navbar .navbar-nav span:focus{text-decoration:none;background:transparent;color:black}mip-nav-slidedown .navbar-wise-close{display:none}mip-nav-slidedown .navbar-brand{float:none;display:inline-block;margin:15px 0 10px;height:41px;background-size:100% auto;position:absolute;font-size:26px}mip-nav-slidedown .navbar-brand:hover,mip-nav-slidedown .navbar-brand:active{color:rgba(255,255,255,0.85)}mip-nav-slidedown .navbar-header{float:left}mip-nav-slidedown .navbar-toggle{display:none}@media screen and (max-width:767px){.mip-nav-wrapper{height:44px}.mip-nav-wrapper #bs-navbar{height:0;transition:height .3s;width:100%;left:0;overflow-y:scroll;-webkit-overflow-scrolling:touch;overflow-scrolling:touch;z-index:1000;border:0;float:none;position:absolute;background-color:white}.mip-nav-wrapper #bs-navbar .navbar-nav{margin:0;min-height:283px;height:100%;display:block}.mip-nav-wrapper #bs-navbar .navbar-nav li{padding:5px 0}.mip-nav-wrapper #bs-navbar .navbar-nav a,.mip-nav-wrapper #bs-navbar .navbar-nav mip-link,.mip-nav-wrapper #bs-navbar .navbar-nav span{text-align:center;color:#333;font-size:18px;padding:0;margin:0 auto;display:block}.mip-nav-wrapper .navbar-header{float:none;overflow:hidden}.mip-nav-wrapper .container>.navbar-collapse{padding:0;background-color:white}.mip-nav-wrapper .navbar-static-top .navbar-brand{left:50%;margin-left:-30px}.mip-nav-wrapper .navbar-static-top a{margin:0}.mip-nav-wrapper .navbar-brand{margin:5px 0 0;height:33px;font-size:23px}.mip-nav-wrapper .navbar-toggle{display:block;margin:8px 0;padding:5px;border:0;background:transparent;float:right}.mip-nav-wrapper .navbar-toggle .icon-bar{background-color:white;height:2px;width:23px;background:#999;display:block}.mip-nav-wrapper .navbar-toggle .icon-bar+.icon-bar{margin-top:6px}.mip-nav-wrapper .hr-xs{display:block !important;border-color:#eee;margin:0 10px;border-top:0}.mip-nav-wrapper .navbar-wise-close{display:block;text-align:center;margin:20px 0}.mip-nav-wrapper #navbar-wise-close-btn{width:40px;height:40px;border-radius:50%;border:1px solid #d4d4d4;display:inline-block;position:relative}.mip-nav-wrapper #navbar-wise-close-btn:before{content:'';width:1px;height:25px;display:inline-block;position:absolute;background:#d4d4d4;transform:rotate(45deg);-webkit-transform:rotate(45deg);top:7px}.mip-nav-wrapper #navbar-wise-close-btn:after{content:'';width:1px;height:25px;display:inline-block;position:absolute;background:#d4d4d4;transform:rotate(-45deg);-webkit-transform:rotate(-45deg);top:7px}.mip-nav-wrapper #navbar-wise-close-btn.down{background:#f3f3f3}.mip-nav-wrapper .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}}@media screen and (min-width:768px){mip-nav-slidedown #bs-navbar li .navbar-more:after{content:'';position:relative;display:inline-block;border:4px solid;top:1px;border-color:#666 transparent transparent;left:3px}mip-nav-slidedown #bs-navbar li:hover .navbar-more:after{border-color:transparent transparent #666;top:-3px}mip-nav-slidedown #bs-navbar li>ul{display:none;list-style:none;position:absolute;background:white}mip-nav-slidedown #bs-navbar li:hover>ul{display:inherit;z-index:10}}");
            }

            if (window.MIP) require(["mip-nav-slidedown"], function (t) {
                e(window.MIP, t);
            }); else require(["mip", "mip-nav-slidedown"], e);
        }();
    }
});
